﻿using System;

namespace Mocola.Common
{
    public class ComparableStringReader : Diff.ComparableStreamReader
    {
        protected string _source;
        protected int _location;
        public ComparableStringReader(string source)
        {
            _source = source;
            _location = 0;
        }

        public override IComparable GetNext()
        {
            if (_location < _source.Length) return _source.Substring(_location++, 1);
            else return null;
        }

    }
}
